/**
 * Created by Gavin on 2016.12.24.
 */

// 产生随机数：当前时间戳+(0~1000)之间的随机数
function randomStr() {
    return new Date().toString() + (Math.random() * 1000 + 1).toString();
}

// login.jsp 验证
function validate() {
    $('#logForm').validate({
        errorElement: 'span',
        errorClass: 'text-error',
        rules: {
            'userName': {
                required: true

            },
            'userPwd': {
                required: true
            },
            'captcha': {
                required: true
            }
        },
        messages: {
            'userName': {
                required: '请输入账户'

            },
            'userPwd': {
                required: '请输入密码'
            },
            'captcha': {
                required: '请输入验证码'
            }
        }
    });
}
